package com.tuozixuan.camel;

import org.apache.camel.builder.RouteBuilder;
import org.springframework.stereotype.Component;

@Component
public class LogDemoRoute extends RouteBuilder {

	@Override
	public void configure() throws Exception {
		
		//from("activemq:orders").to("log:com.mycompany.order?level=DEBUG").to("bean:processOrder");
		//from("direct:start").to("log:foo?logMask=true");
		
		// 以指定的级别输出日志
//		from("file:inbox1").to("log:inboxFileContent?level=TRANCE");
//		from("file:inbox1").to("log:inboxFileContent?level=DEBUG");
//		from("file:inbox1").to("log:inboxFileContent?level=INFO");
//		from("file:inbox1").to("log:inboxFileContent?level=WARN");
//		from("file:inbox1").to("log:inboxFileContent?level=ERROR");
//		from("file:inbox1").to("log:inboxFileContent?level=OFF");
		
		// 统计数据的初始延迟5秒，每隔10秒统计一次，未收到消息也进行统计
//		from("file:inbox1").to("log:inboxFileContent?level=INFO&groupActiveOnly=false&groupDelay=5000&groupInterval=10000");
		
		
	}

}
